package com.hongdee.base.car.service;

import com.hongdee.base.car.entity.TBcCar;
import com.hongdee.base.car.entity.TBcCarTwo;

import java.util.List;
import java.util.Map;

/**
 * Created by My on 2017/2/13.
 */
public interface ICarService {
    /**
     * @param start       当前页面
     * @param limit       页面大小
     * @param bCode       品牌编码
     * @param carModule   车辆型号名称
     * @param carModuleNo 车辆型号代码
     * @param type        类型 0车系1车型
     * @return Map
     * @throws Exception
     * @desc 分页查询接口
     * @author 徐钦勇
     */
    public Map page(String start, String limit, String bCode, String carModule, String carModuleNo, String type, String carSeriesCode, String allSeries) throws Exception;
//    public Map page(String start, String limit, String bCode, String carModule, String carModuleNo, String type, String carSeriesCode) throws Exception;

    public List pages(String uid, int showLevel, String allSeries, boolean allFlag) throws Exception;
    /**
     * @param id 主键
     * @return Map
     * @throws Exception
     * @desc 车型车系详细
     * @author 徐钦勇
     */
    public Map info(String id) throws Exception;

    /**
     * @param
     * @return List
     * @throws Exception
     * @desc 车系下拉列表
     * @author 徐钦勇
     */
    public List<Map> combo(String brandCode, String companyId) throws Exception;

    /**
     * @param id     主键
     * @param status 状态
     * @return Map
     * @throws Exception
     * @desc 启用停用
     * @author 徐钦勇
     */
    public void update(String id, String status) throws Exception;

    /**
     * @param data 实体
     * @return TBcCar
     * @throws Exception
     * @desc 保存或修改
     * @author 徐钦勇
     */
    public TBcCar saveOrUpdate(TBcCar data) throws Exception;

    /**
     * 根据等级、公司品牌查询车型
     *
     * @param companyId
     * @param level
     * @return
     */
    List<Map> queryByLevel(String companyId, String level) throws Exception;

    /**
     * @return
     * @throws Exception
     */
    public List treeCarModle(String pCarSeries) throws Exception;

    /**
     * 树形结构拼接
     */
    public List tree() throws Exception;


    //构建车型车系树
    public List buildCarLevelTree(String uid, int showLevel, String allSeries, boolean allFlag) throws Exception;

    public List buildLevelTree(String uid, int showLevel, String allSeries, boolean allFlag,String brandCode) throws Exception;

    public TBcCar getInfo(String id) throws Exception;

    public TBcCar getInfoByCode(String code) throws Exception;

    /****
     *根据公司 ID，获取公司信息
     * @param companyId
     * @return
     */
    Map<String, String> getOrgInfo(String companyId) throws Exception;

    //构建车型车系树
    // public List buildCarLevelTree(String uid, int showLevel, String allSeries) throws Exception;
}
